package com.harry.web;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Description:
 * @Author: 贺
 * @Date: 2018/4/18
 * @Time: 14:24
 */
@RestController
@RefreshScope
public class HelloController {
    @Value("${foo}")
    String foo;

    @Value("${hello}")
    String hello;

    @RequestMapping(value = "/foo")
    public String foo() {
        return foo;
    }

    @RequestMapping(value = "/hello")
    public String hello() {
        return hello;
    }
}
